using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/// <summary>
/// 僵尸数据基类
/// </summary>
[CreateAssetMenu(menuName = "创建ScriptableObject/Zombies/Base")]
public class ZombieData : EntityData
{
    /// <summary>
    /// 僵尸类型
    /// </summary>
    public ZombieType Type;
    
    /// <summary>
    /// 是否有桶（桶僵尸特有）
    /// </summary>
    public bool HasBucket;
    
    /// <summary>
    /// 是否可以跳跃
    /// </summary>
    public bool CanJump;

    /// <summary>
    /// 基础移动速度
    /// </summary>
    public float BaseMoveSpeed;

    /// <summary>
    /// 在Inspector中点击Reset时调用
    /// </summary>
    private void Reset()
    {
        // 根据不同僵尸类型自动设置默认类型
        if (this is BasicZombieData)
            Type = ZombieType.BasicZombie;
        else if (this is BucketheadZombieData)
            Type = ZombieType.BucketheadZombie;
        else if (this is ConeheadZombieData)
            Type = ZombieType.ConeheadZombie;
    }
}
